package SSM.Chat.Listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.util.Timer;
import java.util.TimerTask;


//@WebListener // 将该类配置为监听器  代替web.xml
public class one implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        try {
            Timer timer = new Timer();
            timer.schedule(new TimerTask() {
                @Override
                public void run() {
                    System.out.println(1);


                }
            }, 0, 1000);

        } catch (Exception e) {
//                   LOGGER.error("GreyClientInitListener error", e);
            System.out.println(e);
        }

    }
}
